﻿using System;
using System.Reflection;

namespace BattleFury.Lib.Bots
{
    public class BotLoader
    {
        public static Bot Load(string botFilename, string botName, long ID)
        {
            var asm = Assembly.LoadFrom(botFilename);
            var type = asm.GetType(botName);
            return (Bot)Activator.CreateInstance(type, ID);
        }
    }
}